home *** CD-ROM | disk | FTP | other *** search
/ Aminet 30 / Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso / Aminet / mus / edit / BeatBox2.lha / BeatBoxII / Install.BeatBox2 < prev    next >
Text File  |  1999-02-07  |  9KB  |  426 lines

  1. ;$VER:2.55
  2. ;installer script by Curt Esser
  3. ;last modified JAN 14 1999
  4. ;nah, it's not copyrighted  ©
  5. ;what could you do with it except install our program?
  6.  
  7. (complete 0)
  8.  
  9. ;(set @default-dest "WORK:")
  10.  
  11. ; Texts
  12.  
  13. (set #Intro-Txt
  14.   (cat "\nWelcome to \n"
  15.   "the BeatBox2 v 2.55\n"
  16.   "Hard Disk Installation Script\n\n"
  17.   "BeatBox2 is designed and programmed by:\n\n"
  18.   "James L. Boyd\n"
  19.   "and\n"
  20.   "Curt Esser\n\n"
  21.   "Note: BeatBox2 requires 515,000 bytes of HD space "
  22.   "for a full installation"
  23. ))
  24.  
  25. (set #Locale-Txt
  26.   (cat "Check the Locale file(s) you want to install "
  27.        "in your SYS:Locale/ directory\n\n"
  28.        "NOTE:  It is NOT necessary to do this.\n"
  29.        "Please read the Help section first"
  30.        ))
  31.  
  32. (set #Locale-Help
  33.   (cat "This section will install the selected "
  34.        "Locale catalogs into your SYS:Locale/ directory.\n\n"
  35.        "It is NOT necessary to do this!\n\n"
  36.        "BeatBox2 will access the Locale files "
  37.        "from it's own directory, so there is really no need "
  38.        "to clutter up your Locale directory unless you "
  39.        "need to have them there for editing.\n\n"
  40.        ))
  41.  
  42. (set #Warning-Txt
  43.   (cat "Warning !\n\n\n"
  44.   "ReqTools.library not found in SYS:Libs/\n\n\n"
  45.   "You MUST install ReqTools.library before running BeatBox2!"
  46. ))
  47.  
  48. (set #Path-Txt
  49.   (cat "Where would you like to Install BeatBox2?\n "
  50.   "A new directory will be created there"
  51. ))
  52.  
  53. (set #Path-Help
  54.   (cat "\nThis section lets you choose the "
  55.   "target directory to install BeatBox2. \n\n"
  56.   "A new directory named BeatBox2 will be created there\n\n\n"
  57.   @askdir-help
  58. ))
  59.  
  60. (set #Type-Help
  61.   (cat "\nThis section lets you choose the "
  62.   "type of installation to be done.\n\n"
  63.   "If you don't have BeatBox2 installed on your "
  64.   "Hard Drive, or if you want to reset your "
  65.   "preferences to the defaults, select New Installation\n\n"
  66.   "If you already have BeatBox2 installed, select Update\n\n"
  67.   "Any projects you have created "
  68.   "or anything you have added to your BeatBox2 directory "
  69.   "will NOT be damaged by either installation\n\n"
  70.   @askoptions-help))
  71.  
  72. (set #Copy-Help
  73.   (cat "In order for BeatBox2 to run properly, "
  74.        "you MUST install these files:\n\n"
  75.        "  BeatBox2\n"
  76.        "  BeatBox2.Prefs\n"
  77.        "  Docs\n"
  78.        "  Fonts\n\n"
  79.        "We also recommend installing:\n\n"
  80.        "  Projects\n"
  81.        "  Icons\n"
  82.        "  Catalogs (if necessary)\n\n"
  83.        
  84. ))
  85.  
  86. (set #CopyCat-Help
  87.   (cat "You only need these if you are using "
  88.        "a language other than English as your "
  89.        "Preferred Locale, "
  90.        "or if you use more than one Preferred Locale"
  91. ))
  92.  
  93. (set #Xtra-Txt
  94.   (cat "Select the Extras you would like installed")
  95. )
  96.  
  97. (set #Xtra-Help
  98.   (cat "Projects: creates a drawer named Projects and "
  99.        "installs two example projects in it\n\n"
  100.        "Icons   : installs a drawer with the Default Project "
  101.        "Icon (needed if you want your projects saved with an "
  102.        "icon attached) and some extra icons")
  103. )  
  104.  
  105.         
  106.  
  107. ; Main ----------------------------
  108.  
  109. (message #Intro-Txt)
  110.  
  111. (IF (NOT (EXISTS "LIBS:reqtools.library"))
  112.     (message #Warning-Txt (all))
  113. )
  114.  
  115. (complete 10)
  116.  
  117.                      ; New install or Update ?
  118.  
  119. (set #InstallType
  120.   (cat "Select the type of Installation")
  121. )
  122. (set OldNew
  123.   (askchoice
  124.      (prompt #InstallType) 
  125.      (help #Type-help)
  126.      (choices
  127.         "New Installation"               ;Bit 0
  128.         "Update existing Installation")  ;Bit 1 
  129.      (default 0)
  130.   )
  131. )
  132.  
  133. (if (= OldNew $01)
  134.  
  135.   (set #Path-Txt
  136.     (cat "Where is your current BeatBox2 directory?\n ")
  137.   )
  138. )
  139.  
  140.  
  141. (if (= OldNew $01)
  142.  
  143.   (set #Path-Help
  144.     (cat "Please indicate where your current "
  145.          "BeatBox2 directory is located\n\n"
  146.          @askdir-help)
  147.   )
  148. )
  149.  
  150.  
  151.  
  152. (set target         ; Where to install ? 
  153.   (askdir 
  154.     (prompt #Path-Txt) 
  155.     (help #Path-Help) 
  156.     (default @default-dest) 
  157.     (newpath)
  158.   )
  159. )
  160.  
  161. (set @default-dest target)
  162.  
  163. (complete 20)
  164.  
  165.  
  166.  
  167. (set #Extras        ;install extras ?
  168.   
  169.   (set Xtra
  170.     (askoptions
  171.        (prompt #Xtra-Txt) 
  172.        (help #Xtra-Help)
  173.        (choices
  174.           "Projects"           ;Bit $01
  175.           "Icons")             ;Bit $02 
  176.     )
  177.   )
  178. )
  179.  
  180. (complete 25)
  181.  
  182. (if (= @user-level 2)
  183.  
  184.   (set #CatType       ;copy catalogs to Locale: ?
  185.   
  186.     (set Clog
  187.       (askoptions
  188.         (prompt #Locale-Txt) 
  189.         (help #Locale-Help)
  190.         (choices
  191.            "English"               ;Bit $01
  192.            "Français")             ;Bit $02 
  193.         (default 0)
  194.       )
  195.     )
  196.   )
  197. )
  198.  
  199.  
  200.  
  201. (complete 30)
  202.  
  203.  
  204. ;---- Copy REQUIRED files ---
  205.  
  206. ; - NO choice - these are all required
  207.  
  208. (copyfiles
  209.   (prompt  "Copying BeatBox2")
  210.   (source "BeatBox2")
  211.   (dest (tackon target "BeatBox2"))
  212. )
  213.  
  214. (copyfiles
  215.   (prompt  "Copying BeatBox2.Prefs")
  216.   (source "BeatBox2.Prefs")
  217.   (dest (tackon target "BeatBox2"))
  218. )
  219.  
  220. (copyfiles
  221.   (prompt  "Copying Fonts")
  222.   (source "fonts/")
  223.   (all)
  224.   (dest (tackon target "BeatBox2/fonts"))
  225. )
  226.  
  227. (complete 40)
  228.  
  229. (copyfiles
  230.   (prompt  "Copying Docs")
  231.   (source "Docs/")
  232.   (all)
  233.   (dest (tackon target "BeatBox2/Docs"))
  234. )
  235.  
  236. (IF (NOT 
  237.   (EXISTS (tackon target "BeatBox2/BeatBox2.key")
  238.   ))
  239.     (copyfiles 
  240.       (source "BeatBox2.key")
  241.       (dest (tackon target "BeatBox2/"))
  242.     )
  243. )
  244.  
  245. ;we need to remove any old catalog files!
  246.  
  247. (IF (EXISTS (tackon target "BeatBox2/catalogs/english/Beatbox2.catalog"))
  248.     (DELETE
  249.      (tackon target "BeatBox2/catalogs/english/BeatBox2.catalog")
  250.     )
  251. )
  252.  
  253. (IF (EXISTS (tackon target "BeatBox2/catalogs/Français/BeatBox2.catalog"))
  254.     (DELETE
  255.     (tackon target "BeatBox2/catalogs/Français/BeatBox2.catalog")
  256.    )
  257. )    
  258.  
  259. (IF (EXISTS ( "SYS:Locale/catalogs/Français/BeatBox2.catalog"))
  260.     (DELETE
  261.      ("SYS:Locale/catalogs/Français/BeatBox2.catalog")
  262.     )
  263. )
  264.  
  265. (IF (EXISTS ( "SYS:Locale/catalogs/english/BeatBox2.catalog"))
  266.     (DELETE
  267.      ("SYS:Locale/catalogs/english/BeatBox2.catalog")
  268.     )
  269. )
  270.  
  271.   
  272.  
  273.  
  274.  
  275. ; -- Copy OPTIONAL Files --
  276.  
  277. (if (= Clog $00)   ;skip this if they sent 'em to LOCALE:
  278.   (copyfiles
  279.     (prompt  "Copying Locale Catalogs")
  280.     (source "Catalogs/")
  281.     (all)
  282.     (dest (tackon target "BeatBox2/Catalogs"))
  283.     (help #CopyCat-Help)
  284.     (confirm)
  285.   )
  286. )
  287.  
  288. (complete 50)
  289.  
  290.  
  291. (if (bitand Xtra $01)
  292.     (copyfiles
  293.       (prompt "Copying Projects")
  294.       (help @copyfiles-help)
  295.       (source "Projects/")
  296.       (dest (tackon target "BeatBox2/Projects"))
  297.       (confirm)
  298.       (all)
  299.     )
  300. )
  301.  
  302. (complete 60)
  303.  
  304. (if (bitand Xtra $02)
  305.     (copyfiles
  306.       (prompt "Copying Icons")
  307.       (help @copyfiles-help)
  308.       (source "Icons/")
  309.       (dest (tackon target "BeatBox2/Icons"))
  310.       (all)
  311.     )
  312. )
  313.  
  314. (complete 70)
  315.  
  316.  
  317. ; -- copy catalogs to Locale: if desired  
  318.  
  319. (if (bitand Clog $01)
  320.     (copyfiles
  321.       (prompt "Copying English Locale")
  322.       (help @copyfiles-help)
  323.       (source "catalogs/English")
  324.       (dest "Locale:catalogs/English/")
  325.       (confirm)
  326.       (all)
  327.     )
  328. )
  329.  
  330. (complete 80)  
  331.  
  332. (if (bitand Clog $02)
  333.     (copyfiles
  334.       (prompt "Copying Français Locale")
  335.       (help @copyfiles-help)
  336.       (source "catalogs/Français")
  337.       (dest "Locale:catalogs/Français")
  338.       (confirm)
  339.       (all)
  340.     )
  341. )  
  342.  
  343.  
  344.  
  345. (complete 90)
  346.  
  347. ; -- OK, now the icons if necessary:
  348.  
  349. ;the main drawer icon:
  350.  
  351. (IF (NOT 
  352.   (EXISTS (tackon target "BeatBox2.info")
  353.   ))
  354.     (copyfiles 
  355.       (source "installicons/BeatBox II.info")
  356.       (dest (target))
  357.       (newname "BeatBox2.info")
  358.       (noposition)
  359.     )
  360. )
  361.  
  362. (complete 95)
  363.  
  364. ;now the icons for inside the main drawer:
  365.  
  366. (if 
  367.    (= OldNew 0)   ;only necessary on new install
  368.       (if (EXISTS (tackon target "BeatBox2/BeatBox2.Prefs"))
  369.         (copyfiles 
  370.           (source "installicons/BeatBox2.Prefs.info")
  371.           (dest (tackon target "BeatBox2"))
  372.         )
  373.       ) 
  374. )
  375.  
  376. (if 
  377.    (= OldNew 0)   ;only necessary on new install
  378.       
  379.       (copyfiles 
  380.          (source "installicons/BeatBox2.info")
  381.          (dest (tackon target "BeatBox2"))
  382.       )
  383. )
  384.  
  385. (if 
  386.    (= OldNew 0)   ;only necessary on new install
  387.       (if (EXISTS (tackon target "BeatBox2/Icons/"))
  388.         (copyfiles 
  389.            (source "installicons/Icons.info")
  390.            (dest (tackon target "BeatBox2"))
  391.         )
  392.       )  
  393. )
  394.  
  395. (if 
  396.    (= OldNew 0)   ;only necessary on new install
  397.       (if (EXISTS (tackon target "BeatBox2/Docs/"))
  398.         (copyfiles 
  399.            (source "installicons/Docs.info")
  400.            (dest (tackon target "BeatBox2"))
  401.         )
  402.       )
  403. )
  404.  
  405.  
  406. (if 
  407.    (= OldNew 0)   ;only necessary on new install
  408.       (if (EXISTS (tackon target "BeatBox2/Projects/"))
  409.         (copyfiles 
  410.            (source "installicons/Projects.info")
  411.            (dest (tackon target "BeatBox2"))
  412.         )
  413.       )
  414. )
  415.  
  416.  
  417. (complete 100)
  418.  
  419. (exit "\n\nJames and Curt hope you enjoy BeatBox2\n\n" 
  420.       "You will find BeatBox2 v2.55 in your\n\n"
  421.       (target)" directory\n\n"
  422.       "\n\nPlease read the docs!"
  423.       (QUIET)
  424.  
  425. )
  426.